# Contributor: Florian Heigl <florian.heigl@gmail.com>
# Maintainer: Florian Heigl <florian.heigl@gmail.com>
pkgname=nvme-cli
pkgver=2.0
pkgrel=0
pkgdesc="NVM-Express user space tooling for Linux"
options="!check" # Requires nose2
arch="all"
url="https://github.com/linux-nvme/nvme-cli"
license="GPL-2.0-only"
makedepends="
	libnvme-dev
	linux-headers
	meson
	util-linux-dev
	uuidgen
	zlib-dev
	"
subpackages="
	$pkgname-doc
	$pkgname-bash-completion
	$pkgname-zsh-completion
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/linux-nvme/nvme-cli/archive/v$pkgver.tar.gz
	fix-include.patch
	"

build() {
	abuild-meson \
		-Ddocs=man \
		-Dudevrulesdir=/usr/lib/udev/rules.d/ \
		. output
	meson compile -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
	rm -rf "$pkgdir"/usr/lib/systemd
}

sha512sums="
24a00ee8e0fc963c1757797413ff5725cec18f821a714d6bbbf37906010d72934d6fdd7b466c085f13716a5279d1a7bd3254ee474e37a0ecd00a85ef23e12417  nvme-cli-2.0.tar.gz
473571ed325e26cd12d9688689342112d7a64ce3e9b700bbe8b616cd7d57799a0c11e317683ba1183e5884e6930e874057108a9182e2c5b7495e3ed877f1f2ff  fix-include.patch
"
